package tr.edu.metu.is.mega.server.validation;

import java.util.List;

/**
 * Validation exception structure.
 */
public class ValidationException extends RuntimeException {

    private static final long serialVersionUID = 2694834658526695542L;

    private final List<ValidationError> errors;

    /**
     * Default constructor.
     * 
     * @param errors list of errors
     */
    public ValidationException(List<ValidationError> errors) {
        this.errors = errors;
    }

    /**
     * Returns the violation errors.
     * 
     * @return the errors
     */
    public List<ValidationError> getErrors() {
        return errors;
    }

}
